package com.usian.type.controller;


import com.usian.commom.pojo.Type;
import com.usian.type.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @TODO:
 * @Author:baimu
 * @Date:2024 10 28 14 13
 **/

@RestController
@RequestMapping("/type")

public class TypeController {
    @Autowired TypeService typeService;

    @GetMapping("/findAll")
    public List<Type> findAll(){
        return typeService.findAll();
    }

    @GetMapping("/findById/{id}")
    public Type findById(@PathVariable Integer id){
        return typeService.findById(id);
    }



}
